<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>文件存储</title>
    <script src="./js/jquery-2.1.4.js"></script>
    <script src="./js/jsbase.js"></script>
</head>

<style>
    body {
        padding : 1rem;
    }

    .files {
        margin : 2rem;
    }

    table td {
        padding : 5px 10px;
    }
</style>

<p>下面是文件列表</p>
<div id="files" class="files"></div>

<script>
    $.getJSON('/files', {}, function(files){

        var html = "<table>";

        ss.each(files, function(file){
            html += ss.string.formatByNumber('<tr><td><a href="/files/{0}">{0}</a></td></tr>',
                    file);
        });

        html += "</table>";

        $("#files").html(html);
    });
</script>
<body>

